home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5326 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  727 b 

  1. Path: news.campus.mci.net!usenet
  2. From: Daniel Cotter <cotter@www.cns.uky.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: Trouble w/ random numbers...please help
  5. Date: 3 Feb 1996 20:22:22 GMT
  6. Organization: MCI State Government and University Systems
  7. Message-ID: <4f0g5u$879@ns.campus.mci.net>
  8. NNTP-Posting-Host: s01-pm02.uky.campus.mci.net
  9.  
  10. I'm trying to write a program that will generate a set of
  11. random numbers between 3 and 18. I have several problems with
  12. this program.
  13. 1. C++ always generates same number(346)
  14. 2. I don't know how to give a range. I've tried 3-18, but
  15.    it thinks I mean to subtract(3-18=15)
  16. 3. When it does work, it's always the same number
  17.  
  18. Please help,
  19. Cotter
  20.  
  21. "Out of the black and into the blue"-Neil Young
  22.  
  23.